///////////////////////////////////////////////////
/// tototoy Code
/// $Id: character.h 17 2009-09-08 06:32:34Z tonyjobmails $
/// $Date: 2009-09-08 14:32:34 +0800 (二, 2009-09-08) $
/// $Author: tonyjobmails $
/// $Revision: 17 $
/// E-mail: tonyjobmails@gmail.com
/// filename: character.h
/// function: 字符结构
///////////////////////////////////////////////////

#ifndef __CHARACTER__H
#define __CHARACTER__H

#include <strings.h>
#include "base.h"

namespace tototoy
{
	static const base_type::_int_16 _INIT_EMOTION = -32767;
	struct _character_type
	{
		_character_type()
		{
			bzero(&data, sizeof(data));
			emotion = _INIT_EMOTION;
		}
		char data;		/// 字符
		base_type::_int_16 emotion;	/// 情绪值

		bool operator == (_character_type const &op_data);		/// 重载==操作符
		_character_type operator = (_character_type const &op_data);	/// 重载=操作符
		bool operator < (_character_type const &op_data);		/// 重载<操作符
		bool operator > (_character_type const &op_data);		/// 重载>操作符

	};

	std::ostream& operator << (std::ostream &output, _character_type const & op_data);	/// 对_charactor_type类型重载<<
};

#endif
